package com.tbs.parkingsaleapp.UI.Widget;

import android.view.View;
import android.widget.LinearLayout;
import com.tbs.parkingsaleapp.Http.JsonData.LikeInfo;
import com.tbs.parkingsaleapp.R;

public class TraitShowController {
    LikeInfo info;
    int[] keys={R.id.c_fulllight,R.id.c_nearroad,R.id.c_nearstore,R.id.c_opensale,R.id.c_spsale,R.id.c_underground};
    boolean[] raw;
    public TraitShowController(View root,LikeInfo info)
    {
        raw=info.raw();
        for (int id:keys
             ) {
            LinearLayout linearLayout=root.findViewById(id);
            int r= Integer.valueOf(linearLayout.getTag().toString());
            if(raw[r])
                linearLayout.setBackground(root.getContext().getDrawable(R.drawable.checkedback));
            else
                linearLayout.setBackground(root.getContext().getDrawable(R.drawable.blank));
        }
    }

}
